<html>
    <head>
      <meta http-equiv="content-type" content="text/html;charset=utf-8">
      <title>Eidt</title>
      <style type="text/css">
            td{min-width: 100px;border-bottom: 1px solid #000000;text-align: center}
             h1{text-align: center}
      </style>
    </head>
    <body>
    <h1>version list</h1>
    <table cellspacing="0">
       <tr>
         <td>
           id
         </td>
         <td>
            time
         </td>
         <td>
            theme
         </td>
         <td>
           imgName
         </td>
         <td>
           sourceName
         </td>
         <td>
            create time
         </td>
         <td>
            update time
         </td>
         <td>
           description
         </td>
         <td colspan="2">
            operation
         </td>
       </tr>
      <% @allVersion.each do |single| %>
          <tr>
            <td>
              <%=single[:id]%>
            </td>
            <td>
              <%=single[:time]%>
            </td>
            <td>
              <%=single[:theme]%>
            </td>
            <td>
              <%=single[:imgName]%>
            </td>
            <td>
              <%=single[:sourceName]%>
            </td>
            <td>
              <%=single[:created_at].strftime('%Y-%m-%d').to_s%>
            </td>
            <td>
              <%=single[:updated_at].strftime('%Y-%m-%d').to_s%>
            </td>
            <td  style="min-width: 300px;text-align: left">
              <%=single[:description]%>
            </td>
            <td>
              <a href="delete?id=<%=single[:id]%>">
                delete
              </a>
            </td>
            <td>
              <a href="edit?id=<%=single[:id]%>">
                edit
              </a>
            </td>
          </tr>
      <%end %>
      <tr>
        <td colspan="10">
          <a href="add">
            Add Version
          </a>
        </td>
      </tr>
    </table>

    </body>
</html>